package com.example.homework.homework02;

public class Student {
    private String name;
    private int age;

    //定义show方法
    public void show(){
        System.out.println("姓名:" + name + "年龄:" + getAge());
    }

    public Student() {
    }

    public Student(int age, String name) {
        this.age = age;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
